package entity;
import java.awt.event.MouseEvent;

public class Dice extends GameClickableObj{

    public Dice(String img,int cropwidth, int cropheight) {
        super(img, cropwidth,cropheight);		
        setX(0);
        setY(20);
    }
	public int getValue() {
            switch((getCurrentImgIndex()+6)%6) {
			case 0: return 6;
			case 1: return 5;
			case 2: return 4;
			case 3: return 3;
			case 4: return 2;
			case 5: return 1;
			default: return 0;
		}
	}
	@Override
    public void mouseClicked(MouseEvent e) {
		System.out.println(getValue());
    }
	@Override
	public void mousePressed(MouseEvent e) {
	}
	@Override
	public void mouseReleased(MouseEvent e) {
	}
	@Override
	public void mouseEntered(MouseEvent e) {
	}
	@Override
	public void mouseExited(MouseEvent e) {
	}
}
